import axios from "axios";

export default {
  /**
   * 获取当前账户信息
   */
  checkLogin() {
    axios.post("/checklogin");
  },
  loginInfo() {
    return axios.get("/security/login");
  },
  simulalteLogin(userName) {
    return axios.get(`/public/tokenLogin?userName=${userName}`);
  },
  saveUser(params) {
    return axios.post("/security/user/saveUser", params);
  },
  deleteUser(params) {
    return axios.post("/security/user/deleteUser", params, {
      headers: {
        "Content-Type": "application/x-www-form-urlencoded"
      }
    });
  },
  getUserList(userType) {
    return axios.get(`/security/user/getUserList?userType=${userType}`);
  },
  getCompany() {
    return axios.get("/security/thirdApi/company");
  }
};
